a17133d498e982db24e992338feebd9dba7b1278,data/org.eclipse.birt.data.aggregation/src/org/eclipse/birt/data/aggregation/impl/TotalMovingAve.java,MyAccumulator,onRow,#Object[]#,123

Before Change


			assert ( args.length > 1 );
			if ( args[0] != null && args[1] != null )
			{
				if ( calculator == null )
				{
					calculator = CalculatorFactory.getCalculator( args[0].getClass( ) );
				}
				try
				{
					if ( list.size( ) == 0 )
					{
						window = DataTypeUtil.toInteger( args[1] ).intValue( );
						assert ( window > 0 );
					}
					list.addLast( args[0] );
					sum = calculator.add( sum, args[0] );

					if ( list.size( ) > window )
					{

After Change


						assert ( window > 0 );
					}
					list.addLast( args[0] );
					sum = calculator.add( sum, calculator.getTypedObject( args[0] ) );

					if ( list.size( ) > window )
					{